import request from '../utils/request';
import { cloud } from '../utils/config';

  /**
   * 查询
   */
  export async function queryAll () {
    return request(`${cloud}/customerDetail/customers`,{
        method: 'get',
        cors:true
      }
    )
  }

/**
 * 增加
 */
export async function create(payload){
  return request(`${cloud}/customerDetail/insert`,{
    method:'post',
    body:JSON.stringify(payload.item)
  })
}

/**
 * 修改
 */
 export async function modify(payload){
   return request(`${cloud}/customerDetail/insert`,{
     method:'post',
     body:JSON.stringify(payload),
     data:JSON.stringify(payload),
   })
 }

/**
 *
 * 删除 
 */
export async function remove(data){
  console.log('555');
  return request(`${cloud}/customerDetail/delete`,{
    method:'delete',
    body:JSON.stringify(id)
  })
}
